<template>
    <div>
        <p>我是儿子组件</p>
        <ul>
            <li v-for="item in boyarr">{{ item }}</li>
        </ul>
        <hr />
        <Grandson></Grandson>
    </div>
</template>

<script setup>
import Grandson from './Grandson.vue';
import { inject } from 'vue'

const boyarr = inject('boyarr');
console.log('boyarr', boyarr);
</script>
<style scoped></style>